package com.iurac.uitl;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class CodeUtil {
    public static boolean checkVerifyCode(String securityCode,HttpSession session){
        String verifyCodeExpected = (String)session.getAttribute(
                com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY);
        if(securityCode == null || !securityCode.toUpperCase().equals(verifyCodeExpected)){
            return false;
        }
        return true;
    }

}
